Skip to main content

CreateScalingRule

Description

create scaling rules.

Request Method

POST

Request Path

/apsara/route/Ess/CreateScalingRule

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
ScalingRuleNameBODYstringNoNo sample value for this parameter.the display name of the scaling rule, 2-40 English or Chinese characters, starting with numbers, large and small letters or Chinese, and can contain numbers, "_", "-" or "." The same user account is unique in the same region and the same scaling group. If this parameter is not specified, the default value is ScalingRuleId.
AdjustmentValueBODYintegerYesNo sample value for this parameter.the adjustment value of the scaling rule. QuantityChangeInCapacity:(0, 100] U (-100, 0] PercentChangeInCapacity:[0, 10000] U [-10000, 0] TotalCapacity:[0, 100]
regionIdBODYstringYesNo sample value for this parameter.region id
ScalingGroupIdBODYstringYesNo sample value for this parameter.the ID of the scaling group to which the scaling rule belongs.
CooldownBODYintegerNoNo sample value for this parameter.cooldown of scaling rules. Value range:[0, 86400], unit: seconds. The default value is: empty.
versionBODYstringNo2016-01-01version of api
AdjustmentTypeBODYstringYesNo sample value for this parameter.How to adjust the scaling rule. Optional value: QuantityChangeInCapacity: increase or decrease the specified number of ECS instances. PercentChangeInCapacity: increase or decrease ECS instances with a specified proportion. TotalCapacity: adjusts the number of ECS instances in the current scaling group to the specified number.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}